package cn.wsgfz;

import com.larvalabs.svgandroid.SVG;
import com.larvalabs.svgandroid.SVGParser;

import cn.wsgfz.widget.PictureDrawablePlus;
import android.content.Context;
import android.graphics.Picture;

public class SizeOfHandler extends SizeOf {
	private Context mContext;
	private int mResId;
	private float mScale;
	
	public SizeOfHandler(Context ctx, int ids, float scale) {
		this.mContext = ctx;
		this.mResId = ids;
		this.mScale = scale;
	}
	
	@Override
	protected Object newInstance() {
		SVG svg = SVGParser.getSVGFromResource(mContext.getResources(), mResId);
		Picture p = svg.getPicture();
		return new PictureDrawablePlus(p, mScale);
	}
}
